home *** CD-ROM | disk | FTP | other *** search
Wrap
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Resources; using DesktopSidebar; namespace NotesEditor { public class CPropertiesDlg : System.Windows.Forms.Form { private System.Windows.Forms.CheckBox chkbShowOutputPanal; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Button btnOK; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; private System.Windows.Forms.TabPage ppGeneral; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.PictureBox pictureBox3; private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.CheckBox checkBox2; private System.Windows.Forms.PictureBox pictureBox2; private System.Windows.Forms.CheckBox checkBox1; private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.TextBox textBox2; private ISidebar m_sidebar; private string dicl2; /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; public CPropertiesDlg(ISidebar sidebar) { // // Required for Windows Form Designer support // m_sidebar = sidebar; InitializeComponent(); sidebar.GetTranslator().TranslateDialog2(new DialogTranslator(this),"NotesEditor.Properties"); } /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } public void setdicl(string dicl3) { this.dicl2 = dicl3; } public void settw(bool twt) { this.checkBox2.Checked = twt; } public string dicl { get { return dicl2; } } public bool GetShowNotesCounter() { return chkbShowOutputPanal.Checked; } public bool twt() { return checkBox2.Checked; } public void SetShowNotesCounter(bool bShowNotesCounter) { chkbShowOutputPanal.Checked = bShowNotesCounter; } public bool dn() { return checkBox1.Checked; } public void setdn(bool sdn) { checkBox1.Checked = sdn; } public void setcb(object sender, System.EventArgs e) { int ind = this.comboBox1.Items.IndexOf(dicl2); this.comboBox1.SelectedIndex = ind; if(this.comboBox1.SelectedIndex==-1) { ind = this.comboBox1.Items.IndexOf(m_sidebar.GetTranslator().TranslateCommand("White")); this.comboBox1.SelectedIndex = ind; } } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CPropertiesDlg)); this.textBox2 = new System.Windows.Forms.TextBox(); this.tabPage3 = new System.Windows.Forms.TabPage(); this.checkBox1 = new System.Windows.Forms.CheckBox(); this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.checkBox2 = new System.Windows.Forms.CheckBox(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.pictureBox3 = new System.Windows.Forms.PictureBox(); this.label3 = new System.Windows.Forms.Label(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.ppGeneral = new System.Windows.Forms.TabPage(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.btnOK = new System.Windows.Forms.Button(); this.textBox1 = new System.Windows.Forms.TextBox(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.btnCancel = new System.Windows.Forms.Button(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.chkbShowOutputPanal = new System.Windows.Forms.CheckBox(); this.tabPage3.SuspendLayout(); this.ppGeneral.SuspendLayout(); this.tabPage2.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabControl1.SuspendLayout(); this.SuspendLayout(); // // textBox2 // this.textBox2.Location = new System.Drawing.Point(8, 56); this.textBox2.Multiline = true; this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; this.textBox2.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox2.Size = new System.Drawing.Size(256, 96); this.textBox2.TabIndex = 6; this.textBox2.Text = ""; // // tabPage3 // this.tabPage3.Controls.Add(this.linkLabel1); this.tabPage3.Controls.Add(this.textBox2); this.tabPage3.Controls.Add(this.label3); this.tabPage3.Controls.Add(this.pictureBox3); this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; this.tabPage3.Size = new System.Drawing.Size(272, 254); this.tabPage3.TabIndex = 3; this.tabPage3.Text = "About"; // // checkBox1 // this.checkBox1.FlatStyle = System.Windows.Forms.FlatStyle.System; this.checkBox1.Location = new System.Drawing.Point(8, 32); this.checkBox1.Name = "checkBox1"; this.checkBox1.Size = new System.Drawing.Size(328, 24); this.checkBox1.TabIndex = 1; this.checkBox1.Text = "Show a warning message before deleting a note"; // // pictureBox2 // this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image"))); this.pictureBox2.Location = new System.Drawing.Point(208, 200); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new System.Drawing.Size(48, 48); this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox2.TabIndex = 6; this.pictureBox2.TabStop = false; // // checkBox2 // this.checkBox2.FlatStyle = System.Windows.Forms.FlatStyle.System; this.checkBox2.Location = new System.Drawing.Point(8, 56); this.checkBox2.Name = "checkBox2"; this.checkBox2.Size = new System.Drawing.Size(328, 24); this.checkBox2.TabIndex = 2; this.checkBox2.Text = "Enable text wrap"; // // linkLabel1 // this.linkLabel1.Location = new System.Drawing.Point(16, 160); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(256, 16); this.linkLabel1.TabIndex = 7; this.linkLabel1.TabStop = true; this.linkLabel1.Text = "I'll be glad to get feedback from you.Click here."; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel1LinkClicked); // // pictureBox3 // this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image"))); this.pictureBox3.Location = new System.Drawing.Point(96, 184); this.pictureBox3.Name = "pictureBox3"; this.pictureBox3.Size = new System.Drawing.Size(72, 72); this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox3.TabIndex = 6; this.pictureBox3.TabStop = false; // // label3 // this.label3.Font = new System.Drawing.Font("Times New Roman", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label3.Location = new System.Drawing.Point(8, 0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(256, 56); this.label3.TabIndex = 5; this.label3.Text = "Notes Editor Panel for Desktop Sidebar"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // pictureBox1 // this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(208, 200); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(48, 48); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.TabIndex = 5; this.pictureBox1.TabStop = false; // // ppGeneral // this.ppGeneral.Controls.Add(this.checkBox2); this.ppGeneral.Controls.Add(this.checkBox1); this.ppGeneral.Controls.Add(this.chkbShowOutputPanal); this.ppGeneral.Controls.Add(this.pictureBox1); this.ppGeneral.Location = new System.Drawing.Point(4, 22); this.ppGeneral.Name = "ppGeneral"; this.ppGeneral.Size = new System.Drawing.Size(272, 254); this.ppGeneral.TabIndex = 0; this.ppGeneral.Text = "General"; // // label1 // this.label1.Location = new System.Drawing.Point(8, 8); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(240, 16); this.label1.TabIndex = 0; this.label1.Text = "Select the default text color of a note:"; // // label2 // this.label2.Font = new System.Drawing.Font("Times New Roman", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label2.Location = new System.Drawing.Point(24, 8); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(256, 32); this.label2.TabIndex = 0; this.label2.Text = "Notes Editor Panel-Help"; // // btnOK // this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.System; this.btnOK.Location = new System.Drawing.Point(128, 296); this.btnOK.Name = "btnOK"; this.btnOK.TabIndex = 1; this.btnOK.Text = "OK"; // // textBox1 // this.textBox1.Location = new System.Drawing.Point(8, 40); this.textBox1.Multiline = true; this.textBox1.Name = "textBox1"; this.textBox1.ReadOnly = true; this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox1.Size = new System.Drawing.Size(256, 208); this.textBox1.TabIndex = 1; this.textBox1.Text = ""; // // tabPage2 // this.tabPage2.Controls.Add(this.textBox1); this.tabPage2.Controls.Add(this.label2); this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2"; this.tabPage2.Size = new System.Drawing.Size(272, 254); this.tabPage2.TabIndex = 2; this.tabPage2.Text = "Help"; // // comboBox1 // this.comboBox1.Items.AddRange(new object[] { m_sidebar.GetTranslator().TranslateCommand("Black"), m_sidebar.GetTranslator().TranslateCommand("Red"), m_sidebar.GetTranslator().TranslateCommand("Green"), m_sidebar.GetTranslator().TranslateCommand("Yellow"), m_sidebar.GetTranslator().TranslateCommand("Blue"), m_sidebar.GetTranslator().TranslateCommand("Purple"), m_sidebar.GetTranslator().TranslateCommand("Orange"), m_sidebar.GetTranslator().TranslateCommand("White"), m_sidebar.GetTranslator().TranslateCommand("Turquoise")}); this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox1.Location = new System.Drawing.Point(56, 40); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(104, 21); this.comboBox1.TabIndex = 4; this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.ComboBox1SelectedIndexChanged); // // btnCancel // this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.btnCancel.Location = new System.Drawing.Point(208, 296); this.btnCancel.Name = "btnCancel"; this.btnCancel.TabIndex = 2; this.btnCancel.Text = "Cancel"; // // tabPage1 // this.tabPage1.Controls.Add(this.comboBox1); this.tabPage1.Controls.Add(this.label1); this.tabPage1.Controls.Add(this.pictureBox2); this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Size = new System.Drawing.Size(272, 254); this.tabPage1.TabIndex = 1; this.tabPage1.Text = "Notes"; // // tabControl1 // this.tabControl1.Controls.Add(this.ppGeneral); this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage3); this.tabControl1.Location = new System.Drawing.Point(8, 8); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; this.tabControl1.Size = new System.Drawing.Size(280, 280); this.tabControl1.TabIndex = 4; this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.setcb); // // chkbShowOutputPanal // this.chkbShowOutputPanal.FlatStyle = System.Windows.Forms.FlatStyle.System; this.chkbShowOutputPanal.Location = new System.Drawing.Point(8, 8); this.chkbShowOutputPanal.Name = "chkbShowOutputPanal"; this.chkbShowOutputPanal.Size = new System.Drawing.Size(328, 24); this.chkbShowOutputPanal.TabIndex = 0; this.chkbShowOutputPanal.Text = "Show notes counter"; // // CPropertiesDlg // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(298, 328); this.Controls.Add(this.tabControl1); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnOK); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.Name = "CPropertiesDlg"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Notes Editor Properties"; this.tabPage3.ResumeLayout(false); this.ppGeneral.ResumeLayout(false); this.tabPage2.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabControl1.ResumeLayout(false); this.ResumeLayout(false); } #endregion void ComboBox1SelectedIndexChanged(object sender, System.EventArgs e) { this.dicl2 = this.comboBox1.SelectedItem.ToString(); } void LinkLabel1LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { System.Diagnostics.Process.Start("http://www.desktopsidebar.com/forums/index.php?showtopic=1925&st=0entry11261"); } } }